package cn.com.haopy.yue.ai.core.executor;

import java.util.concurrent.*;


public class ExecutorCore {

//    private static final ExecutorService executor = Executors.newFixedThreadPool(1);
    /**
     *
     */
    private static final ExecutorService EXECUTOR = new ThreadPoolExecutor(20,  Integer.MAX_VALUE, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(10));

    public static void execute(Runnable runnable) {
        EXECUTOR.execute(runnable);
    }

    public static <T> Future<T> submit(Callable<T> task) {
        return EXECUTOR.submit(task);
    }

}
